{% extends "@CoreBundle/layout/pop.html.twig" %}

{% block page_title %}视频管理{% endblock %}
{% block breadcrumb %}
	<li class="breadcrumb-item">
		<a href="{{ path("admin_teach_course_index") }}">课程管理</a>
	</li>
	<li class="breadcrumb-item">
		<a href="{{ path("admin_teach_chapter_index", {"id":id}) }}">章节管理</a>
	</li>
{% endblock %}

{% block body_javascript %}
	{{ parent() }}
	{% if vodAdapter == 1 %}
		<script>
var appId = "{{ tengxunyunAppId }}";
var courseName = "{{ fileName }}";
var admin_api_glob_tengxunyunSignatureDo = "{{ path('admin_api_glob_tengxunyunSignatureDo') }}";
var admin_api_glob_tengxunyunVodAndvancePlaySignDo = "{{ path('admin_api_glob_tengxunyunVodAndvancePlaySignDo') }}";
var vodStatus = {{ (videoInfo and videoInfo["videoId"] != "" and videoInfo["status"] ==1) ? 1 : 0 }};
var videoId = "{{ if_set(videoInfo, 'videoId') }}";
		</script>
		{{ encore_entry_script_tags('edux_admin_teach_vod_tengxunyun') }}
	{% endif %}

	{% if vodAdapter == 2 %}
		<script>
var region = "{{ region }}";
var userId = "{{ userId }}";
var fileName = "{{ fileName }}";
var admin_api_glob_aliyunVodCreateUploadVideoDo = "{{ path('admin_api_glob_aliyunVodCreateUploadVideoDo') }}";
var admin_api_glob_aliyunVodRefreshUploadVideoDo = "{{ path('admin_api_glob_aliyunVodRefreshUploadVideoDo') }}";
var vodStatus = {{ (videoInfo and videoInfo["videoId"] != "" and videoInfo["status"] ==1) ? 1 : 0 }};
var videoId = "{{ if_set(videoInfo, 'videoId') }}";
var palyAuth = "{{ palyAuth }}";
		</script>
		{{ encore_entry_script_tags('edux_admin_teach_vod_aliyun') }}
	{% endif %}
{% endblock %}

{% block head_stylesheets %}
	{{ parent() }}
	{% if vodAdapter == 1 %}
		{{ encore_entry_link_tags('edux_admin_teach_vod_tengxunyun') }}
	{% endif %}
	{% if vodAdapter == 2 %}
		<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css"/>
		<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script>
		{# <script src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-vod-anti-min.js"></script> #}
		{{ encore_entry_link_tags('edux_admin_teach_vod_aliyun') }}
	{% endif %}
{% endblock %}

{% block page %}
	{% if vodAdapter == 1 %}
		{% include '@EduxBundle/teach/chapter/vodView/tengxunyun.html.twig' %}
	{% endif %}
	{% if vodAdapter == 2 %}
		{% include '@EduxBundle/teach/chapter/vodView/aliyun.html.twig' %}
	{% endif %}
{% endblock %}
